﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/admin/admin.master" AutoEventWireup="true" CodeBehind="TreatmentEdit.aspx.cs" Inherits="web.admin.TreatmentEdit"
    Title="修改治疗" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="SubMenu_Item" cellspacing="0" cellpadding="0" width="100%" border="0">
        <tbody>
            <tr>
                <td>
                    <table cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                            <tr>
                                <td class="Current_Item" id="TD2">修改治疗</td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
    
    <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tbody>
	        <tr>
	            <td>
	                <asp:Label ID="errorMsg" Visible="false" Text="" runat="server" ForeColor="red"/>
                     <asp:DetailsView ID="treatmentInfo" runat="server" AutoGenerateRows="False" SkinID="orange" DataKeyNames="Id" 
                        DefaultMode="Edit"  OnDataBound="DataBound">
                        <Fields>
                            <asp:TemplateField HeaderText="治疗名称：" >
                                <EditItemTemplate>
                                    <asp:TextBox ID="name" runat="server" width="150" Text='<%# Eval("Name") %>'/>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText=" 拼音首字母（大写字母）：" >
                                <EditItemTemplate>
                                    <asp:TextBox ID="PinYin" runat="server" width="50" Text='<%# Eval("PinYin") %>'/>
                                </EditItemTemplate>
                            </asp:TemplateField>                               
                            <asp:TemplateField HeaderText="通用名：" >
                                <EditItemTemplate>
                                    <asp:TextBox ID="GeneralName" runat="server" width="150" Text='<%# Eval("GeneralName") %>'/>
                                </EditItemTemplate>
                            </asp:TemplateField>                             
                            <asp:TemplateField HeaderText="治疗类型：">
                                <EditItemTemplate>
                                    <asp:DropDownList ID="typeList" runat="server" />
                                </EditItemTemplate>
                            </asp:TemplateField>                             
                            <asp:TemplateField HeaderText="是否可量化：">
                                <EditItemTemplate>
                                    <asp:RadioButtonList ID="isQuantified" runat="server" AutoPostBack="true" OnSelectedIndexChanged="IsQuantifiedChanged">
                                        <asp:ListItem Text="是" Value="1"/>
                                        <asp:ListItem Text="否" Value="0"/>
                                    </asp:RadioButtonList>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="量化单位：" >
                                <EditItemTemplate>
                                    <asp:TextBox ID="measurementUtils" runat="server" width="150" Text='<%# Eval("MeasurementUnits")%>' />
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="上下限：" >
                                <EditItemTemplate>
                                    从<asp:TextBox ID="minValue" runat="server" width="25" Text='<%# Eval("MinValue")%>' />&nbsp;-&nbsp;
                                    <asp:TextBox ID="maxValue" runat="server" width="25" Text='<%# Eval("MaxValue")%>' />
                                </EditItemTemplate>
                            </asp:TemplateField>                            
                            <asp:TemplateField HeaderText="选项描述：">
                                <EditItemTemplate>
                                    <asp:TextBox ID="choicesDescription" runat="server" width="500" Text='<%# Eval("ChoicesDescription")%>' />
                                </EditItemTemplate>
                            </asp:TemplateField>    
                            <asp:TemplateField HeaderText="使用频率单位：" >
                                <EditItemTemplate>
                                    <asp:DropDownList ID="frequency" runat="server" >
                                        <asp:ListItem Text="每天" Value="天" />
                                        <asp:ListItem Text="每星期" Value="星期" />
                                        <asp:ListItem Text="每月" Value="月" />
                                    </asp:DropDownList>
                                </EditItemTemplate>
                            </asp:TemplateField>                              
                            <asp:TemplateField HeaderText="治疗简介：" >
                                <EditItemTemplate>
                                    <asp:TextBox ID="introduction" runat="server" TextMode="MultiLine" Text='<%# Eval("Intro")%>' width="450" height="50"/>
                                </EditItemTemplate>
                            </asp:TemplateField>    
                            <asp:TemplateField HeaderText="病人总数：" >
                                <EditItemTemplate>
                                    <asp:Label ID="patientCount" Text='<%# Eval("PatientCount")%>' runat="server" />
                                </EditItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="治疗描述：">
                                <EditItemTemplate>
                                    <asp:TextBox id="description" runat="server" style="DISPLAY:none" Text='<%# Eval("Desp")%>'></asp:TextBox>
			                        <iframe id="form2" src="../ewebeditor/ewebeditor.htm?id=description&style=coolblue" frameborder="0" scrolling="no" 
			                            width="650" height="350">
			                        </iframe>                                
			                    </EditItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField>
                                 <EditItemTemplate>
                                    <asp:Button ID="UpdateButton" runat="server"  CausesValidation="True" Text="修改" OnClick="UpdateButton_click"/> &nbsp;
                                    <asp:Button ID="UpdateCancelButton" runat="server" CausesValidation="False" Text="取消" OnClick="CancelButton_click"/>
                                </EditItemTemplate>
                            </asp:TemplateField>
                        </Fields>
                    </asp:DetailsView>                   
	            </td>
	        </tr> 	    
	    </tbody>
    </table>	                
</asp:Content>
